Skip to content

[New Rule] Kubernetes execution_user_exec_to_pod #1979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 9, 2022

Conversation

imays11
Copy link
Contributor

@imays11 imays11 commented May 17, 2022

Issues

#1978

Summary

This rule detects a user attempt to exec into a pod or container. Execing into a pod allows a user to execute any process in the container which is not already running. A user may execute the bash process to gain an interactive shell which will allow access to any data the pod has permissions to, including secrets.

Contributor checklist

@imays11 imays11 added OS: Linux Rule: New Proposal for new rule v8.3.0 Rules for 8.3.0 Integration: Kubernetes Kubernetes Integration labels May 17, 2022
@imays11 imays11 requested review from w0rk3r and terrancedejesus May 17, 2022 19:08
@imays11 imays11 self-assigned this May 17, 2022
@imays11 imays11 linked an issue May 17, 2022 that may be closed by this pull request
Copy link
Contributor

@terrancedejesus terrancedejesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Made a small suggestions to the description.

@terrancedejesus terrancedejesus requested a review from w0rk3r May 18, 2022 15:05
@imays11 imays11 requested a review from DefSecSentinel May 19, 2022 14:13
Copy link
Contributor

@Mikaayenson Mikaayenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the data look like when the attempt fails or when its another user with different privileges?

@terrancedejesus terrancedejesus self-requested a review May 23, 2022 15:14
@imays11 imays11 marked this pull request as draft June 2, 2022 16:48
@imays11 imays11 marked this pull request as ready for review June 3, 2022 17:14
toml-linted the file and added to the false positive description
@botelastic botelastic bot added the RTA work on RTA framework label Jun 3, 2022
@imays11 imays11 marked this pull request as draft June 3, 2022 22:31
Added this back into the repo, deleted by mistake.
@imays11 imays11 marked this pull request as ready for review June 6, 2022 16:15
Copy link
Contributor

@DefSecSentinel DefSecSentinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

min stack version determined by integration support of necessary fields
@imays11 imays11 merged commit 63fda01 into main Jun 9, 2022
@imays11 imays11 deleted the 1978-new-rule-kubernetes-exec-into-podcontainer branch June 9, 2022 21:52
protectionsmachine pushed a commit that referenced this pull request Jun 9, 2022
* Create execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

* Update non-ecs-schema.json

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

Co-authored-by: Terrance DeJesus <[email protected]>

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* toml-linted file and add to false positive

toml-linted the file and added to the false positive description

* Create notepad.sct

Added this back into the repo, deleted by mistake.

* added min_stack_version based on integration

min stack version determined by integration support of necessary fields

Co-authored-by: Jonhnathan <[email protected]>
Co-authored-by: Terrance DeJesus <[email protected]>
Co-authored-by: Colson Wilhoit <[email protected]>

(cherry picked from commit 63fda01)
protectionsmachine pushed a commit that referenced this pull request Jun 9, 2022
* Create execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

* Update non-ecs-schema.json

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

Co-authored-by: Terrance DeJesus <[email protected]>

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* toml-linted file and add to false positive

toml-linted the file and added to the false positive description

* Create notepad.sct

Added this back into the repo, deleted by mistake.

* added min_stack_version based on integration

min stack version determined by integration support of necessary fields

Co-authored-by: Jonhnathan <[email protected]>
Co-authored-by: Terrance DeJesus <[email protected]>
Co-authored-by: Colson Wilhoit <[email protected]>

(cherry picked from commit 63fda01)
protectionsmachine pushed a commit that referenced this pull request Jun 9, 2022
* Create execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

* Update non-ecs-schema.json

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

Co-authored-by: Terrance DeJesus <[email protected]>

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* toml-linted file and add to false positive

toml-linted the file and added to the false positive description

* Create notepad.sct

Added this back into the repo, deleted by mistake.

* added min_stack_version based on integration

min stack version determined by integration support of necessary fields

Co-authored-by: Jonhnathan <[email protected]>
Co-authored-by: Terrance DeJesus <[email protected]>
Co-authored-by: Colson Wilhoit <[email protected]>

(cherry picked from commit 63fda01)
protectionsmachine pushed a commit that referenced this pull request Jun 9, 2022
* Create execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

* Update non-ecs-schema.json

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

Co-authored-by: Terrance DeJesus <[email protected]>

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* toml-linted file and add to false positive

toml-linted the file and added to the false positive description

* Create notepad.sct

Added this back into the repo, deleted by mistake.

* added min_stack_version based on integration

min stack version determined by integration support of necessary fields

Co-authored-by: Jonhnathan <[email protected]>
Co-authored-by: Terrance DeJesus <[email protected]>
Co-authored-by: Colson Wilhoit <[email protected]>

(cherry picked from commit 63fda01)
protectionsmachine pushed a commit that referenced this pull request Jun 9, 2022
* Create execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

* Update non-ecs-schema.json

* Update execution_user_exec_to_pod.toml

* Update rules/integrations/kubernetes/execution_user_exec_to_pod.toml

Co-authored-by: Terrance DeJesus <[email protected]>

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* Update execution_user_exec_to_pod.toml

* toml-linted file and add to false positive

toml-linted the file and added to the false positive description

* Create notepad.sct

Added this back into the repo, deleted by mistake.

* added min_stack_version based on integration

min stack version determined by integration support of necessary fields

Co-authored-by: Jonhnathan <[email protected]>
Co-authored-by: Terrance DeJesus <[email protected]>
Co-authored-by: Colson Wilhoit <[email protected]>

(cherry picked from commit 63fda01)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto Integration: Kubernetes Kubernetes Integration OS: Linux RTA work on RTA framework Rule: New Proposal for new rule v8.3.0 Rules for 8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Rule] Kubernetes Exec into Pod/Container
6 participants